package com.stone.dp.buidler.dp_builder;

public class Builder {

	private String name;

	private int age;

	private String address;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Builder(String name, int age, String address) {
		super();
		this.name = name;
		this.age = age;
		this.address = address;
	}

	static public MyBuilder builder() {
		return new MyBuilder();
	}

	static public class MyBuilder {

		private String name;

		private int age;

		private String address;

		public MyBuilder name(String name) {
			this.name = name;
			return this;
		}

		public MyBuilder age(int age) {
			this.age = age;
			return this;
		}

		public MyBuilder address(String address) {
			this.address = address;
			return this;
		}

		public Builder build() {
			return new Builder(name, age, address);
		}
	}

}
